package top.lakakala.service;

import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.lakakala.dao.BulletinMapper;
import top.lakakala.entity.Bulletin;

import java.util.List;

/**
 * Created by k3312 on 2017/8/3.
 */
@Service
@Transactional
public class BulletinService {
    public static final int INDEX_BULLETIN_PAGE_SIZE = 5;
    @Autowired
    private BulletinMapper bulletinMapper;

    public List<Bulletin> indexBulletionList() {
        PageHelper.startPage(1, BulletinService.INDEX_BULLETIN_PAGE_SIZE);
        List<Bulletin> bulletinList = bulletinMapper.selectList();
        return bulletinList;
    }
}
